Disable some over-zealous sanity checking for now (can cause major problems
authorsmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 16:59:03 +0000 (17:59 +0100)
committersmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 16:59:03 +0000 (17:59 +0100)
with live migration to localhost). A proper fix will follow.

Signed-off-by: Steven Hand <steven@xensource.com>
tools/examples/block

index ff297d82d481a5da98e354e6d13afe600d03374a..5d101520b23fe4eaa546eb81df6f53b3e8f948e2 100644 (file)
@@ -89,29 +89,34 @@ check_sharing()
     fi
   done
 
-  for file in /sys/devices/xen-backend/*/physical_device
-  do
-    if [ -e "$file" ] # Cope with no devices, i.e. the * above did not expand.
-    then
-      local d=$(cat "$file")
-      if [ "$d" == "$devmm" ]
-      then
-        if [ "$mode" == 'w' ]
-        then
-          echo 'guest'
-          return
-        else
-          local m=$(cat "${file/physical_device/mode}")
-
-          if expr index "$m" 'w' >/dev/null
-          then
-            echo 'guest'
-            return
-          fi
-        fi
-      fi
-    fi
-  done
+##
+## XXX SMH: the below causes live migration on localhost to fail sometimes
+## since the source domain may still appear to be using a local device. 
+## For now simply comment it out - a proper fix will come in due course. 
+
+#   for file in /sys/devices/xen-backend/*/physical_device
+#   do
+#     if [ -e "$file" ] # Cope with no devices, i.e. the * above did not expand.
+#     then
+#       local d=$(cat "$file")
+#       if [ "$d" == "$devmm" ]
+#       then
+#         if [ "$mode" == 'w' ]
+#         then
+#           echo 'guest'
+#           return
+#         else
+#           local m=$(cat "${file/physical_device/mode}")
+
+#           if expr index "$m" 'w' >/dev/null
+#           then
+#             echo 'guest'
+#             return
+#           fi
+#         fi
+#       fi
+#     fi
+#   done
 
   echo 'ok'
 }